\hypertarget{classmapping_1_1_map}{\section{mapping.\-Map Class Reference}
\label{classmapping_1_1_map}\index{mapping.\-Map@{mapping.\-Map}}
}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{classmapping_1_1_map_a6a9d2cfcaab36ec82d0e09e66f710fdd}{set\-Bits}
\item 
def \hyperlink{classmapping_1_1_map_a5ae81610e107863f4890f72900392b87}{get\-Bits}
\item 
def \hyperlink{classmapping_1_1_map_ae1bfdf344f302b7781fed95cdec9fc53}{create\-Raw\-Count}
\item 
def \hyperlink{classmapping_1_1_map_a7994df6db1613a257ed1bbc32411e493}{create\-Raw\-State}
\item 
def \hyperlink{classmapping_1_1_map_aee045b31f6bdb351d5d1cc81cb43fc2a}{create\-State}
\item 
def \hyperlink{classmapping_1_1_map_a345b4a78c29f882d8eb84435d3db3eac}{invert\-State}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The Cantor pairing function is a pairing function. \href{http://en.wikipedia.org/wiki/Cantor_pairing_function}{\tt http\-://en.\-wikipedia.\-org/wiki/\-Cantor\-\_\-pairing\-\_\-function} 

\subsection{Member Function Documentation}
\hypertarget{classmapping_1_1_map_ae1bfdf344f302b7781fed95cdec9fc53}{\index{mapping\-::\-Map@{mapping\-::\-Map}!create\-Raw\-Count@{create\-Raw\-Count}}
\index{create\-Raw\-Count@{create\-Raw\-Count}!mapping::Map@{mapping\-::\-Map}}
\subsubsection[{create\-Raw\-Count}]{\setlength{\rightskip}{0pt plus 5cm}def mapping.\-Map.\-create\-Raw\-Count (
\begin{DoxyParamCaption}
\item[{}]{count}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classmapping_1_1_map_ae1bfdf344f302b7781fed95cdec9fc53}
Creates to a unique numerical state from the current card counts. \begin{DoxyPrecond}{Precondition}
none 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
none 
\end{DoxyPostcond}

\begin{DoxyParams}{Parameters}
{\em count} & Object of type Card\-Counter that contains the current card counts. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A number packed with all of the card counting techniques available. 
\end{DoxyReturn}
\hypertarget{classmapping_1_1_map_a7994df6db1613a257ed1bbc32411e493}{\index{mapping\-::\-Map@{mapping\-::\-Map}!create\-Raw\-State@{create\-Raw\-State}}
\index{create\-Raw\-State@{create\-Raw\-State}!mapping::Map@{mapping\-::\-Map}}
\subsubsection[{create\-Raw\-State}]{\setlength{\rightskip}{0pt plus 5cm}def mapping.\-Map.\-create\-Raw\-State (
\begin{DoxyParamCaption}
\item[{}]{player\-\_\-value, }
\item[{}]{dealer\-\_\-value, }
\item[{}]{player\-\_\-type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classmapping_1_1_map_a7994df6db1613a257ed1bbc32411e493}
Creates a valid state from raw integer values. \begin{DoxyPrecond}{Precondition}
none 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
none 
\end{DoxyPostcond}

\begin{DoxyParams}{Parameters}
{\em player\-\_\-value} & The value of the players hand (see\-: ) \\
\hline
{\em delaer\-\_\-value} & The value of the dealers hand (see\-: ) \\
\hline
{\em player\-\_\-type} & The type of the players hand (see\-: ) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Tuple of two numbers (k1, k2) that when Cantor paired produce the input parameter. 
\end{DoxyReturn}
\hypertarget{classmapping_1_1_map_aee045b31f6bdb351d5d1cc81cb43fc2a}{\index{mapping\-::\-Map@{mapping\-::\-Map}!create\-State@{create\-State}}
\index{create\-State@{create\-State}!mapping::Map@{mapping\-::\-Map}}
\subsubsection[{create\-State}]{\setlength{\rightskip}{0pt plus 5cm}def mapping.\-Map.\-create\-State (
\begin{DoxyParamCaption}
\item[{}]{player\-\_\-hand, }
\item[{}]{dealer\-\_\-card}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classmapping_1_1_map_aee045b31f6bdb351d5d1cc81cb43fc2a}
Maps the players hand, and the dealer up-\/card to a unique state. \begin{DoxyPrecond}{Precondition}
none 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
none 
\end{DoxyPostcond}

\begin{DoxyParams}{Parameters}
{\em player\-\_\-hand} & The players entire hand. \\
\hline
{\em dealer\-\_\-card} & The dealer up-\/card. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The unique state of the game. 
\end{DoxyReturn}
\hypertarget{classmapping_1_1_map_a5ae81610e107863f4890f72900392b87}{\index{mapping\-::\-Map@{mapping\-::\-Map}!get\-Bits@{get\-Bits}}
\index{get\-Bits@{get\-Bits}!mapping::Map@{mapping\-::\-Map}}
\subsubsection[{get\-Bits}]{\setlength{\rightskip}{0pt plus 5cm}def mapping.\-Map.\-get\-Bits (
\begin{DoxyParamCaption}
\item[{}]{number, }
\item[{}]{length, }
\item[{}]{offset}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classmapping_1_1_map_a5ae81610e107863f4890f72900392b87}
Retrieves a section of bits within a given integer. \begin{DoxyPrecond}{Precondition}
none 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
none 
\end{DoxyPostcond}

\begin{DoxyParams}{Parameters}
{\em number} & The integer number that contains the information for extraction. \\
\hline
{\em length} & The total number of bits to extract. \\
\hline
{\em offset} & Bit offset within number. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A number of bit count length extract from number starting at the offset location. 
\end{DoxyReturn}
\hypertarget{classmapping_1_1_map_a345b4a78c29f882d8eb84435d3db3eac}{\index{mapping\-::\-Map@{mapping\-::\-Map}!invert\-State@{invert\-State}}
\index{invert\-State@{invert\-State}!mapping::Map@{mapping\-::\-Map}}
\subsubsection[{invert\-State}]{\setlength{\rightskip}{0pt plus 5cm}def mapping.\-Map.\-invert\-State (
\begin{DoxyParamCaption}
\item[{}]{state}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classmapping_1_1_map_a345b4a78c29f882d8eb84435d3db3eac}
Separates a state into the values used to create the state. \begin{DoxyPrecond}{Precondition}
none 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
none 
\end{DoxyPostcond}

\begin{DoxyParams}{Parameters}
{\em state} & The state to break apart. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Tuple of the players hand value and type, and the value of the dealers hand. 
\end{DoxyReturn}
\hypertarget{classmapping_1_1_map_a6a9d2cfcaab36ec82d0e09e66f710fdd}{\index{mapping\-::\-Map@{mapping\-::\-Map}!set\-Bits@{set\-Bits}}
\index{set\-Bits@{set\-Bits}!mapping::Map@{mapping\-::\-Map}}
\subsubsection[{set\-Bits}]{\setlength{\rightskip}{0pt plus 5cm}def mapping.\-Map.\-set\-Bits (
\begin{DoxyParamCaption}
\item[{}]{number, }
\item[{}]{value, }
\item[{}]{offset}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classmapping_1_1_map_a6a9d2cfcaab36ec82d0e09e66f710fdd}
Sets specific bits within a given integer. \begin{DoxyPrecond}{Precondition}
none 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
none 
\end{DoxyPostcond}

\begin{DoxyParams}{Parameters}
{\em number} & The integer number that value will be inserted into at the given offset. \\
\hline
{\em value} & The value to insert into number. \\
\hline
{\em offset} & Bit offset within number. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The original number with the specified value at the given offset location. 
\end{DoxyReturn}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
rlblackjack/\hyperlink{mapping_8py}{mapping.\-py}\end{DoxyCompactItemize}
